package com.wedo.mall.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by e on 2017/7/27.
 */

public class Shopping implements Parcelable {
    public String agent_name;
    public String logo;
    public List<Goods> goodsList;

    public boolean check = false;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.agent_name);
        dest.writeString(this.logo);
        dest.writeTypedList(this.goodsList);
        dest.writeByte(this.check ? (byte) 1 : (byte) 0);
    }

    public Shopping() {
    }

    protected Shopping(Parcel in) {
        this.agent_name = in.readString();
        this.logo = in.readString();
        this.goodsList = in.createTypedArrayList(Goods.CREATOR);
        this.check = in.readByte() != 0;
    }

    public static final Parcelable.Creator<Shopping> CREATOR = new Parcelable.Creator<Shopping>() {
        @Override
        public Shopping createFromParcel(Parcel source) {
            return new Shopping(source);
        }

        @Override
        public Shopping[] newArray(int size) {
            return new Shopping[size];
        }
    };
}
